﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ObjectBakery.Adapters.Strategies;
namespace ObjectBakery.Adapters
{
    public class Adapter<Tin, Tout> : IAdapterStrategy<Tin, Tout>
    {
        public Tin ImplementationObject
        {
            get
            {
                return strategy.ImplementationObject;
            }
            set
            {
                strategy.ImplementationObject = ImplementationObject;
            }
        }
        IAdapterStrategy<Tin, Tout> strategy;

        public Adapter(IAdapterStrategy<Tin, Tout> strategy)
        {
            this.strategy = strategy;
        }

        public void Fill(Tout reference)
        {
            strategy.Fill(reference);
        }
        public void Flush(Tout reference)
        {
            strategy.Flush(reference);
        }
    }
}
